<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>学生编辑 -  学生管理系统</title>
    <meta name="author" content="yinqi">
    <link href="../../css/bootstrap.min.css" rel="stylesheet">
    <link href="../../css/materialdesignicons.min.css" rel="stylesheet">
    <link href="../../css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside th:replace="fragment/_fragment::navbar"></aside>


        <!--头部信息-->
        <header th:replace="fragment/_fragment::sidebar"></header>


        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">

                                <form th:action="@{/update/updateStudent}" method="post">
                                    <div class="form-group">
                                        <label for="id">学号：</label>
                                        <input type="text" class="form-control" id="id" name="id" th:value="${student.id}" readonly>
                                    </div>
                                    <div class="form-group">
                                        <label for="name">姓名：</label>
                                        <input type="text" class="form-control" id="name" name="name" th:value="${student.name}" >
                                    </div>
                                    <div class="form-group">
                                        <label for="age">年龄：</label>
                                        <input type="text" class="form-control" id="age" name="age" th:value="${student.age}">
                                    </div>

                                    <div class="form-group">
                                        <label>性别：</label>
                                        <input type="radio" name="sex" value="男" checked="checked" th:if="${student.sex=='男'}"/><span th:if="${student.sex=='男'}">男</span>
                                        <input type="radio" name="sex" value="女" th:if="${student.sex=='男'}"><span th:if="${student.sex=='男'}">女</span>
                                        <input type="radio" name="sex" value="男" th:if="${student.sex=='女'}"><span th:if="${student.sex=='女'}">男</span>
                                        <input type="radio" name="sex" value="女" checked="checked" th:if="${student.sex=='女'}"/><span th:if="${student.sex=='女'}">女</span>
                                    </div>
                                    <div class="form-group">
                                        <label for="subject">专业：</label>
                                        <input type="text" class="form-control" id="subject" name="subject" th:value="${student.subject}" >
                                    </div>
                                    <div class="form-group">
                                        <label for="dept">系别：</label>
                                        <input type="text" class="form-control" id="dept" name="dept" th:value="${student.dept}">
                                    </div>
                                    <div class="form-group">
                                        <label for="addr">籍贯：</label>
                                        <input type="text" class="form-control" id="addr" name="addr" th:value="${student.addr}">
                                    </div>

                                    <div class="form-group" style="text-align: center">
                                        <input class="btn btn-primary" type="submit" value="提交" />
                                        <input class="btn btn-default" type="button" value="返回" onclick="goback()"/>
                                    </div>
                                </form>

                            </div>
                        </div>
                    </div>

                </div>

            </div>

        </main>

    </div>
</div>

<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="../../js/main.min.js"></script>
<script src="../../layer/layer.js"></script>
<script type="text/javascript">
    function goback() {
        window.history.back()
    }
</script>
</body>
</html>